CBMSTEVE.CA - Steve J. Gray's Homepage
CBMSTEVE.CA - Personal pages of Steve J. Gray
Changes Info Prototypes Remakes PET Projects CBM Projects Modding 3D Models KiCad Github Ohio Scientific Other My Software My Collections Facebooks

PET FunFonts Project

Introduction

Welcome to the PET FunFonts Page! This is a fun projects to spice up your boring PET screen. The PET has had the same basic fonts from the first model to the last, whereas computers like the C64 have had the ability to load custom fonts. Many C64 games had their own character sets in all kinds of cool and wacky styles. While the PET does not have any ability to soft-load fonts out of the box, we can add more fixed fonts to the PET using newer large-capacity EPROMS. We just need a way to select them. My solution is a combination of hardware and software that does just that.

Hardware

The FunFonts hardware consists of one FunFont pcb that is installed in place of the normal PET character ROM. This has a socket for an EEPROM that can hold up to 64 standard PET fonts. Each font takes 1K and contains 128 characters in an 8x8 pixel matrix. The PET character ROM normally hold 2 fonts - a "graphic" font and a "text" font, however it can also hold an additional 2 "alternate" fonts, for a total of 4 fonts in one SET. We can have up to 16 SETS in the EEPROM. There are 6 dip switches on the board to select which font is displayed. Four switches control the SET, and two switches set which of the 4 fonts are selected of those switches. There are also two additional slide switches to enable/disable the PET's ability to change the font. One controls the GRAPHIC/TEXT line and the other controls the NORMAL/ALTERNATE line. Lastly, there is an external control header that can be used to control the board with software. Currently this can be done with the PET's USER PORT. In the future I hope to design another board that can be installed internally to free up the USER PORT for other uses.

My 2332 Adapter can optionally be used to store the FunFont firmware along with other option ROMs all selectable via dip switches.

Fonts

I collected a bunch of C64 fonts and filtered out the ones that did not contain a complete set of text characters, and that also had the proper quarter-block characters required to build 4x4 sized text. The first font is the standard PET font but the rest are all different. I tried to pick ones that were unique but still useful/usable. If you find additional fonts that might work let me know and I will start collecting them for a second set.

Firmware

I have written the firmware with ACME. It can be assembled to reside at either of the option ROM addresses $9xxx or $Axxx. Pre-assembled binaries are available on the github. The firmware has two functions. The first is controlling the user port to select a font or font set, and the second is to draw "4x4" size fonts. The 4x4 fonts are drawn using the 16 semi-graphics character which consist of all combinations of 4x4 pixel blocks occupying the 4 quadrants of the 8x8 pixel character. The Option ROMs take 4K of address space. The firmware code is reserved 1K of space, leaving 3K free to hold three 1K fonts. You can also use the other Option ROM space for 4 additional fonts.

I recommend you use one of my 2332 Multi-ROM adapters to store the firmware if you have other Option ROMs that occupy the same slot, otherwise you can burn the firmware into a 2532 EPROM on its own.

You must do a SYS to initialize the system before you can do any of the drawing functions.

At the start of the ROM there is a jump table. The BASIC demo programs have code to automatically determine which Option ROM contains the firmware and sets several variables J1 to J5 for the most common entry points.

SYS CALL VAR DESCRIPTION
SYS ORG+00J1Initialize 4x4 FONT set
SYS ORG+03J2Set SCREEN width (40/80)
SYS ORG+06J3Print SCREEN code (0-127)
SYS ORG+09J4Print PETSCII code
SYS ORG+12J5Select FONT (0-63) via USER-PORT, and Screen Mode (4-bit mode)
SYS ORG+15- Set FONT pointer for RAM font
SYS ORG+18- Set SCREEN and CHR pointers directly
SYS ORG+21- Convert CHRCODE to SCREEN
SYS ORG+24- Display FONT

Demo Software

I have included a few BASIC demo programs with some helpful subroutines that you can include in your own programs. A simple GOSUB can initialize everything for you. Included is a font viewer that you can use to display the complete character set of each font in the set and even do a slideshow. Also included is a text display program and a random character generator. Lastly, there is a PRG with the initialization code only that you can load as a base when writting a new FunFont program of your own.

Status

The FunFonts pcb is complete and tested. The firmware has basic functionality but I want to expand it to include additional pixel ploting features and perhaps line and box drawing. Demo software included. User-port and internal control boards have not been started.

Pictures

Github

The Kicad schematics and gerbers are available on Github here.

Project History

Contact

Page Created: Dec 8/2025. Last updated: Dec 8/2025, 5:00pm EST

Send comments or feedback to Steve Gray(sjgray@rogers.com)